package io;

import java.util.Date;

public class Test {
    public static void main(String[] args) {
        /*
            获取当前系统时间的毫秒值，返回的为UTC时间
            返回的时自:1970-01-01 00:00:00 到当前系统时间所经过的毫秒
         */
        long time = System.currentTimeMillis();
        System.out.println(time);

        Date now = new Date(time);
        System.out.println(now);

        time = time/1000/60/60/24/365;
        System.out.println(time);


        long max = Long.MAX_VALUE;
        max = max/1000/60/60/24/365;
        System.out.println("公元:"+(1970+max));

    }
}
